<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>函数数组练习</title>
    <script>
        /* 函数数组练习 */
        function Person(name, age) {
            this.name = name;
            this.age = age;

        }
        Person.prototype.toString = function() {
            console.log("name=" + this.name, "age=" + this.age);

        }
        var per = new Person("孙悟空", "18");
        var per1 = new Person();
        var per2 = new Person();

        console.log(per.toString());
    </script>
</head>

<body>

</body>

</html>